PulseCanvas / app · pulsecanvas.ai / Sources / PulseCanvas / Resources / ProjectM / Presets / Particles / Swarm / martin - autumn leaves.milk
| 1 | MILKDROP_PRESET_VERSION=201 |
| 2 | PSVERSION=3 |
| 3 | PSVERSION_WARP=3 |
| 4 | PSVERSION_COMP=3 |
| 5 | [preset00] |
| 6 | fRating=5.000000 |
| 7 | fGammaAdj=1.880 |
| 8 | fDecay=0.500 |
| 9 | fVideoEchoZoom=1.000 |
| 10 | fVideoEchoAlpha=0.500 |
| 11 | nVideoEchoOrientation=3 |
| 12 | nWaveMode=4 |
| 13 | bAdditiveWaves=1 |
| 14 | bWaveDots=0 |
| 15 | bWaveThick=0 |
| 16 | bModWaveAlphaByVolume=1 |
| 17 | bMaximizeWaveColor=0 |
| 18 | bTexWrap=1 |
| 19 | bDarkenCenter=0 |
| 20 | bRedBlueStereo=0 |
| 21 | bBrighten=0 |
| 22 | bDarken=1 |
| 23 | bSolarize=0 |
| 24 | bInvert=0 |
| 25 | fWaveAlpha=0.526 |
| 26 | fWaveScale=1.050 |
| 27 | fWaveSmoothing=0.000 |
| 28 | fWaveParam=-0.220 |
| 29 | fModWaveAlphaStart=0.810 |
| 30 | fModWaveAlphaEnd=1.400 |
| 31 | fWarpAnimSpeed=1.459 |
| 32 | fWarpScale=2.007 |
| 33 | fZoomExponent=1.00000 |
| 34 | fShader=0.300 |
| 35 | zoom=0.99990 |
| 36 | rot=0.00000 |
| 37 | cx=0.500 |
| 38 | cy=0.500 |
| 39 | dx=0.00000 |
| 40 | dy=0.00000 |
| 41 | warp=0.00909 |
| 42 | sx=0.99990 |
| 43 | sy=1.00000 |
| 44 | wave_r=0.000 |
| 45 | wave_g=0.000 |
| 46 | wave_b=0.000 |
| 47 | wave_x=0.500 |
| 48 | wave_y=0.500 |
| 49 | ob_size=0.050 |
| 50 | ob_r=0.800 |
| 51 | ob_g=1.000 |
| 52 | ob_b=1.000 |
| 53 | ob_a=0.000 |
| 54 | ib_size=0.000 |
| 55 | ib_r=0.000 |
| 56 | ib_g=0.000 |
| 57 | ib_b=0.000 |
| 58 | ib_a=0.000 |
| 59 | nMotionVectorsX=64.000 |
| 60 | nMotionVectorsY=48.000 |
| 61 | mv_dx=0.000 |
| 62 | mv_dy=0.000 |
| 63 | mv_l=1.850 |
| 64 | mv_r=0.500 |
| 65 | mv_g=0.500 |
| 66 | mv_b=0.500 |
| 67 | mv_a=0.000 |
| 68 | b1n=0.000 |
| 69 | b2n=0.000 |
| 70 | b3n=0.000 |
| 71 | b1x=0.800 |
| 72 | b2x=0.700 |
| 73 | b3x=1.000 |
| 74 | b1ed=0.250 |
| 75 | wavecode_0_enabled=0 |
| 76 | wavecode_0_samples=182 |
| 77 | wavecode_0_sep=60 |
| 78 | wavecode_0_bSpectrum=0 |
| 79 | wavecode_0_bUseDots=1 |
| 80 | wavecode_0_bDrawThick=0 |
| 81 | wavecode_0_bAdditive=0 |
| 82 | wavecode_0_scaling=0.14868 |
| 83 | wavecode_0_smoothing=0.00000 |
| 84 | wavecode_0_r=1.000 |
| 85 | wavecode_0_g=1.000 |
| 86 | wavecode_0_b=1.000 |
| 87 | wavecode_0_a=0.400 |
| 88 | wave_0_per_frame1=t1 = 1; t2 = 0; |
| 89 | wavecode_1_enabled=0 |
| 90 | wavecode_1_samples=100 |
| 91 | wavecode_1_sep=0 |
| 92 | wavecode_1_bSpectrum=0 |
| 93 | wavecode_1_bUseDots=1 |
| 94 | wavecode_1_bDrawThick=1 |
| 95 | wavecode_1_bAdditive=0 |
| 96 | wavecode_1_scaling=0.89152 |
| 97 | wavecode_1_smoothing=0.00000 |
| 98 | wavecode_1_r=1.000 |
| 99 | wavecode_1_g=1.000 |
| 100 | wavecode_1_b=1.000 |
| 101 | wavecode_1_a=0.100 |
| 102 | wavecode_2_enabled=0 |
| 103 | wavecode_2_samples=512 |
| 104 | wavecode_2_sep=0 |
| 105 | wavecode_2_bSpectrum=0 |
| 106 | wavecode_2_bUseDots=0 |
| 107 | wavecode_2_bDrawThick=1 |
| 108 | wavecode_2_bAdditive=0 |
| 109 | wavecode_2_scaling=0.89152 |
| 110 | wavecode_2_smoothing=0.82000 |
| 111 | wavecode_2_r=1.000 |
| 112 | wavecode_2_g=1.000 |
| 113 | wavecode_2_b=1.000 |
| 114 | wavecode_2_a=0.100 |
| 115 | wavecode_3_enabled=0 |
| 116 | wavecode_3_samples=512 |
| 117 | wavecode_3_sep=0 |
| 118 | wavecode_3_bSpectrum=1 |
| 119 | wavecode_3_bUseDots=1 |
| 120 | wavecode_3_bDrawThick=0 |
| 121 | wavecode_3_bAdditive=0 |
| 122 | wavecode_3_scaling=1.00000 |
| 123 | wavecode_3_smoothing=0.50000 |
| 124 | wavecode_3_r=1.000 |
| 125 | wavecode_3_g=1.000 |
| 126 | wavecode_3_b=1.000 |
| 127 | wavecode_3_a=1.000 |
| 128 | shapecode_0_enabled=0 |
| 129 | shapecode_0_sides=4 |
| 130 | shapecode_0_additive=0 |
| 131 | shapecode_0_thickOutline=0 |
| 132 | shapecode_0_textured=1 |
| 133 | shapecode_0_num_inst=1 |
| 134 | shapecode_0_x=0.700 |
| 135 | shapecode_0_y=0.300 |
| 136 | shapecode_0_rad=0.48446 |
| 137 | shapecode_0_ang=0.00000 |
| 138 | shapecode_0_tex_ang=0.00000 |
| 139 | shapecode_0_tex_zoom=1.87510 |
| 140 | shapecode_0_r=1.000 |
| 141 | shapecode_0_g=1.000 |
| 142 | shapecode_0_b=1.000 |
| 143 | shapecode_0_a=1.000 |
| 144 | shapecode_0_r2=1.000 |
| 145 | shapecode_0_g2=1.000 |
| 146 | shapecode_0_b2=1.000 |
| 147 | shapecode_0_a2=0.000 |
| 148 | shapecode_0_border_r=1.000 |
| 149 | shapecode_0_border_g=1.000 |
| 150 | shapecode_0_border_b=0.000 |
| 151 | shapecode_0_border_a=0.000 |
| 152 | shapecode_1_enabled=0 |
| 153 | shapecode_1_sides=32 |
| 154 | shapecode_1_additive=0 |
| 155 | shapecode_1_thickOutline=0 |
| 156 | shapecode_1_textured=0 |
| 157 | shapecode_1_num_inst=37 |
| 158 | shapecode_1_x=0.500 |
| 159 | shapecode_1_y=0.500 |
| 160 | shapecode_1_rad=0.03630 |
| 161 | shapecode_1_ang=0.81681 |
| 162 | shapecode_1_tex_ang=0.37699 |
| 163 | shapecode_1_tex_zoom=1.02841 |
| 164 | shapecode_1_r=1.000 |
| 165 | shapecode_1_g=1.000 |
| 166 | shapecode_1_b=1.000 |
| 167 | shapecode_1_a=0.050 |
| 168 | shapecode_1_r2=1.000 |
| 169 | shapecode_1_g2=1.000 |
| 170 | shapecode_1_b2=1.000 |
| 171 | shapecode_1_a2=0.000 |
| 172 | shapecode_1_border_r=1.000 |
| 173 | shapecode_1_border_g=1.000 |
| 174 | shapecode_1_border_b=1.000 |
| 175 | shapecode_1_border_a=0.000 |
| 176 | shapecode_2_enabled=0 |
| 177 | shapecode_2_sides=26 |
| 178 | shapecode_2_additive=0 |
| 179 | shapecode_2_thickOutline=0 |
| 180 | shapecode_2_textured=0 |
| 181 | shapecode_2_num_inst=2 |
| 182 | shapecode_2_x=0.500 |
| 183 | shapecode_2_y=0.500 |
| 184 | shapecode_2_rad=0.15038 |
| 185 | shapecode_2_ang=0.00000 |
| 186 | shapecode_2_tex_ang=0.62832 |
| 187 | shapecode_2_tex_zoom=1.35189 |
| 188 | shapecode_2_r=1.000 |
| 189 | shapecode_2_g=1.000 |
| 190 | shapecode_2_b=1.000 |
| 191 | shapecode_2_a=0.500 |
| 192 | shapecode_2_r2=1.000 |
| 193 | shapecode_2_g2=1.000 |
| 194 | shapecode_2_b2=1.000 |
| 195 | shapecode_2_a2=0.000 |
| 196 | shapecode_2_border_r=0.500 |
| 197 | shapecode_2_border_g=0.500 |
| 198 | shapecode_2_border_b=0.500 |
| 199 | shapecode_2_border_a=0.000 |
| 200 | shapecode_3_enabled=0 |
| 201 | shapecode_3_sides=24 |
| 202 | shapecode_3_additive=0 |
| 203 | shapecode_3_thickOutline=0 |
| 204 | shapecode_3_textured=1 |
| 205 | shapecode_3_num_inst=1 |
| 206 | shapecode_3_x=0.700 |
| 207 | shapecode_3_y=0.510 |
| 208 | shapecode_3_rad=0.19869 |
| 209 | shapecode_3_ang=0.00000 |
| 210 | shapecode_3_tex_ang=1.00531 |
| 211 | shapecode_3_tex_zoom=0.49981 |
| 212 | shapecode_3_r=1.000 |
| 213 | shapecode_3_g=1.000 |
| 214 | shapecode_3_b=0.990 |
| 215 | shapecode_3_a=0.000 |
| 216 | shapecode_3_r2=0.000 |
| 217 | shapecode_3_g2=0.000 |
| 218 | shapecode_3_b2=0.000 |
| 219 | shapecode_3_a2=1.000 |
| 220 | shapecode_3_border_r=0.000 |
| 221 | shapecode_3_border_g=0.500 |
| 222 | shapecode_3_border_b=0.500 |
| 223 | shapecode_3_border_a=0.000 |
| 224 | per_frame_init_1=zo=1; zo_=0.1; zo__=0.02; tstart=time; |
| 225 | per_frame_init_2=t1=rand(12); t2=rand(12); |
| 226 | per_frame_1=dt=1/fps; dec_m = 1-2*dt; dec_s = 1-0.5*dt; |
| 227 | per_frame_2=vol = (2*bass_att+mid_att+treb_att)/3; |
| 228 | per_frame_3= |
| 229 | per_frame_4=p = progress; |
| 230 | per_frame_5=trest = if (p==0,100000, (time-tstart)*(1-p)/p); |
| 231 | per_frame_6= |
| 232 | per_frame_7=v = max(0,vol); |
| 233 | per_frame_8=dec = if (v>vol_,1-1*dt,1-0.25*dt); |
| 234 | per_frame_9=vol_= vol_*dec+(1-dec)*v; |
| 235 | per_frame_10=spd = vol_*dt * (0.5+zo__)/4; |
| 236 | per_frame_11= |
| 237 | per_frame_12=isb = above(vol, pk) * (time>t0+.5); |
| 238 | per_frame_13=if (isb,t0=time; pk=vol*3,Pk*=dec_s); |
| 239 | per_frame_14=bi += isb; |
| 240 | per_frame_15= |
| 241 | per_frame_16=sw = isb&&(rand(1)>0.7)&&(time-ts>8); |
| 242 | per_frame_17=if (sw,ts=time,0); |
| 243 | per_frame_18=zo = if(sw, int(rand(3))*0.7+0.3,zo); |
| 244 | per_frame_19=zo_ += atan(10*(zo-zo_))*dt*0.2; |
| 245 | per_frame_20=zo__ = zo__*dec_m + (1-dec_m)*zo_; |
| 246 | per_frame_21= |
| 247 | per_frame_22= |
| 248 | per_frame_23=if (isb&&(bi%2==0),r1 = rand(2)-1,0); |
| 249 | per_frame_24=if (isb&&(bi%3==0),r2 = rand(2)-1,0); |
| 250 | per_frame_25=if (isb&&(bi%5==2),r3 = rand(2)-1,0); |
| 251 | per_frame_26= |
| 252 | per_frame_27=r1a += atan(50*(r1-r1a))*spd*.1; |
| 253 | per_frame_28=r2a += atan(50*(r2-r2a))*spd*.1; |
| 254 | per_frame_29=r3a += atan(50*(r3-r3a))*spd*.1; |
| 255 | per_frame_30= |
| 256 | per_frame_31=r1b = r1b*dec_m + (1-dec_m)*r1a; |
| 257 | per_frame_32=r2b = r2b*dec_m + (1-dec_m)*r2a; |
| 258 | per_frame_33=r3b = r3b*dec_m + (1-dec_m)*r3a; |
| 259 | per_frame_34=r1c = r1c*dec_m + (1-dec_m)*r1b; |
| 260 | per_frame_35=r2c = r2c*dec_m + (1-dec_m)*r2b; |
| 261 | per_frame_36=r3c = r3c*dec_m + (1-dec_m)*r3b; |
| 262 | per_frame_37= |
| 263 | per_frame_38=s1 += (1+r1c)*spd; |
| 264 | per_frame_39=s2 += (r2c)*spd; |
| 265 | per_frame_40=s3 += (1+r2c)*spd; |
| 266 | per_frame_41= |
| 267 | per_frame_42=q1=r1c; |
| 268 | per_frame_43=q2=r2c; |
| 269 | per_frame_44=q3=r3c; |
| 270 | per_frame_45=q4=(q1-q2)*0.2; |
| 271 | per_frame_46=q5=s1; |
| 272 | per_frame_47=q6=s2; |
| 273 | per_frame_48=q7=s3*4; |
| 274 | per_frame_49=q8=(s2+s3)*12; |
| 275 | per_frame_50=q10 = zo__; |
| 276 | per_frame_51= |
| 277 | per_frame_52=q12 = 0.2; //front-back light |
| 278 | per_frame_53=tr = tr*dec_m + (1-dec_m)*trest/5; |
| 279 | per_frame_54=q20 = max(0,min(1,tr)); //fade - does not work |
| 280 | per_frame_55= |
| 281 | per_frame_56=//colors |
| 282 | per_frame_57=t1 += spd*0.12; |
| 283 | per_frame_58=t2 += spd*0.07; |
| 284 | per_frame_59=q21 = 1.5 + 0.3*sin(t1); |
| 285 | per_frame_60=q22 = 1 + 0.3*sin(t2); |
| 286 | per_frame_61=monitor = t1; |
| 287 | per_pixel_1=rot = -q1*(sqr(x-0.5+0.2*(q2+q3))+ sqr(y-0.5+0.2*(q1-q3))); |
| 288 | per_pixel_2=fac = 0.04; |
| 289 | per_pixel_3=rot -= (sin(x*8+8*q1)+sin(y*8+q3*8))*fac; |
| 290 | per_pixel_4=zoom = 1-(y-0.5)*sin((q5+q6)*0.3); |
| 291 | warp_1=`#define sat saturate |
| 292 | warp_2=`sampler sampler_pw_noise_lq; |
| 293 | warp_3=`float dr, smask, stripe, h, dist; |
| 294 | warp_4=`float2 uv1, uv2, uv3,uv4,uv5,uv6; |
| 295 | warp_5=`float3 lea, noise, ret1, struc, neu; |
| 296 | warp_6=` |
| 297 | warp_7=`float aTan2(float y, float x) {float angle; float abs_y = abs(y); float r; |
| 298 | warp_8=`if (x>=0) {r=1-(x-abs_y) / (x+abs_y); } else {r=3-(x+abs_y) / (abs_y-x);} |
| 299 | warp_9=`return (y < 0 ? -r : r)/4;} |
| 300 | warp_10=` |
| 301 | warp_11=`shader_body { |
| 302 | warp_12=`float2 uv1 = (uv-.5+0.2*q2)*aspect.xy; |
| 303 | warp_13=`lea = 0; |
| 304 | warp_14=`int anz = 4; |
| 305 | warp_15=`for (float n=anz; n>0; n--) { |
| 306 | warp_16=` dist = (1.5+q2)*0.33*n/anz; |
| 307 | warp_17=` uv4 = 256 * (dist* uv1)*q10; |
| 308 | warp_18=` |
| 309 | warp_19=` float aa = (1.0+q3/2)*n/anz+q1*(1+uv1.x*0)/2 ; |
| 310 | warp_20=` uv4 = mul(uv4,float2x2(cos(aa),-sin(aa),sin(aa),cos(aa))); |
| 311 | warp_21=` stripe = (16-0.8*abs(floor(uv4.x)));; |
| 312 | warp_22=` uv4.y += stripe*q5 + (16-stripe)*q6 - 8.0*n; |
| 313 | warp_23=` |
| 314 | warp_24=` noise = tex2D (sampler_pw_noise_lq,uv4/256); |
| 315 | warp_25=` smask = sat (64*(noise.b-(0.98-(stripe/16)*0.1))); //0.1=dens. |
| 316 | warp_26=` |
| 317 | warp_27=` aa = (noise.g-0.5)*q8; |
| 318 | warp_28=` uv5 = mul(frac(uv4)-0.5,float2x2(cos(aa),-sin(aa),sin(aa),cos(aa))); |
| 319 | warp_29=` |
| 320 | warp_30=` dr = (abs(sin(uv4.y*0.5 +2*q7*noise.r))); |
| 321 | warp_31=` uv5.x *= 1/dr; |
| 322 | warp_32=` struc = tex2D(sampler_noise_hq,0.5*aTan2(uv5.x,uv5.y+0.4))-0.5; |
| 323 | warp_33=` uv6 = uv5; |
| 324 | warp_34=` uv5 += struc*n*.25*(noise.r); |
| 325 | warp_35=` h = smask*sat (8-16*length(uv5)); |
| 326 | warp_36=` neu = h*float3 ((noise.rg+float2(q21,q22))*(.16/abs(dr-struc.x)),0.9); |
| 327 | warp_37=` lea = lerp (lea, neu, h); |
| 328 | warp_38=`} |
| 329 | warp_39=`//lea.rg *= 1-sat(tex2D(sampler_noise_lq,uv6*.1).r-.4)*h; |
| 330 | warp_40=`ret = lea; |
| 331 | warp_41=`//ret = max (ret, (ret.b==0)*GetPixel((uv_orig-0.5)*2+0.4)*0.6); |
| 332 | warp_42=` |
| 333 | warp_43=`} |
| 334 | comp_1=`#define sat saturate |
| 335 | comp_2=`sampler sampler_clouds; |
| 336 | comp_3=`float z, sun, tmp; |
| 337 | comp_4=`float2 uv1, uv2, dz; |
| 338 | comp_5=`float3 sky, cloud, lea; |
| 339 | comp_6=`static float2 hor = float2 (texsize.z,0)*1; |
| 340 | comp_7=`static float2 ver = float2 (0,texsize.w)*1; |
| 341 | comp_8=` |
| 342 | comp_9=`float2 noise4 (float2 uvi) { float2 n1,n2,n3,n4,n5, zv; zv = 0.003*time; |
| 343 | comp_10=` n1 = tex2D(sampler_noise_hq, (uvi)); |
| 344 | comp_11=` n2 = tex2D(sampler_noise_hq, (uvi*3+zv)); |
| 345 | comp_12=` n3 = tex2D(sampler_noise_hq, (uvi*9+zv)); |
| 346 | comp_13=` return sat(n1 + n2/3 + n3/9-0.5);} |
| 347 | comp_14=` |
| 348 | comp_15=`shader_body { |
| 349 | comp_16=`uv1 = uv-.5; |
| 350 | comp_17=`tmp = 0; |
| 351 | comp_18=`for (int n = 1; n <= 4; n++) { |
| 352 | comp_19=` uv2 = 0.16*uv1 * (1-tmp*.05)*(.5+uv.y)*q10 + .004*time; |
| 353 | comp_20=` tmp = noise4(uv2).x; |
| 354 | comp_21=`} |
| 355 | comp_22=`cloud = sat(tmp) ; |
| 356 | comp_23=` |
| 357 | comp_24=`ret = float3 (0.2,0.4,1.25)*sat(uv.y)*(rand_preset.z-0.2)+cloud*0.5*(1.4-uv.y); |
| 358 | comp_25=`ret += 0.1/length(uv-1.1*rand_preset.xy+0*noise4(uv*0.25)*.25) * float3 (1,0.8,0.5)* sat(1-cloud); |
| 359 | comp_26=`ret *= 1-pow(rad,2)*0.7; |
| 360 | comp_27=`uv2 = (uv-0.5)*0.5+0.45+0.05*q3; |
| 361 | comp_28=`dz.x=GetPixel(uv2-hor)-GetPixel(uv2+hor); |
| 362 | comp_29=`dz.y=GetPixel(uv2-ver)-GetPixel(uv2+ver); |
| 363 | comp_30=` |
| 364 | comp_31=`lea = GetPixel(uv2); |
| 365 | comp_32=`ret *= sat (1-lea.b); |
| 366 | comp_33=`ret += lea*float3(1,1,0) * (1+q12); |
| 367 | comp_34=` |
| 368 | comp_35=`lea = lerp(2*GetBlur1(uv),GetPixel(uv),sat(6*q10-2)) * sat(1-8*lea.b) ; |
| 369 | comp_36=`ret *= sat (1-lea.b*0.8); |
| 370 | comp_37=`ret += lea*float3(1,1,0) * (1-q12); |
| 371 | comp_38=` |
| 372 | comp_39=`ret = lerp (lum(ret)*(q20*0.6+0.4),ret,q20); |
| 373 | comp_40=`//if (ret.r == 0) {discard;} |
| 374 | comp_41=` |
| 375 | comp_42=`} |
| 376 | comp_43=`written by martin |
| 377 | comp_44=`END |